package com.leilei.canal;

import com.leilei.canal.client.CanalClient;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

/**
 * @author leiguodong
 * @version 1.0
 */
@SpringBootApplication
public class CanalApplcation implements CommandLineRunner {

    @Resource
    private CanalClient canalClient;


    public static void main(String[] args) {
        SpringApplication.run(CanalApplcation.class,args);
    }


    @Override
    public void run(String... args) throws Exception {
        //项目启动，执行canal客户端监听
        canalClient.run();
    }
}


